<link type="text/css" href="/admins/js/jquery/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<link href="/css/home/replacerecharge.css" media="screen" rel="stylesheet" type="text/css" > 
<script type="text/javascript" src="/js/boxy/js/jquery.boxy.js"></script>

<script type="text/javascript">
    $(function(){
        window.alert = Boxy.alert;
    });
    <?php if($this->ma == 1) { ?>
        alert("活动添加成功！");
        location.href="/admini/goods/hotindex";
    <?php }?>
</script>
<div class="admin_nrtop">
    <div class="ad_search" style="font-size: 24px;">
        添加HOT商品
    </div>
</div>
<style>
    .add_div table{width: 960px;font-size: 16px;}
    .add_div table tr{height: 36px;}
    .add_div table .bf{text-align: right;margin-right: 5px;width:120px;}
    .add_div table input{font-size: 16px;width: 280px;}
    .add_div table select{font-size: 16px;width: 280px;}
    #getinfo{float: right;    height: 32px;    padding: 0 10px;}
</style>
<div  class="biaoge">
    <div class="add_div">
        <form action="/admini/goods/addhot/" method="post">
           <div class="applytable">
                    <table>
                        <tr>
                            <td class="z">数据1：</td>
                            <td>
                                 <div class="input" style="border:0px;">     
                                        <input class="required" type="text" id="item1" name="item1"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="z">数据2：</td>
                            <td>
                                <div class="input" style="border:0px;">     
                                        <input class="required" type="text" id="title" name="item2"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="z">数据3：</td>
                            <td>
                                <div class="input" style="border:0px;">                       
                                        <input class="required" type="text" id="url" name="item3"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="z">数据4：</td>
                            <td>
                                <div class="input" style="border:0px;">
                                        <input class="required" type="text" id="price" name="item4"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="z">数据5：</td>
                            <td>
                                <div class="input" style="border:0px;">
                                        <input class="required" type="text" id="cost" name="item5"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="z">数据6：</td>
                            <td>
                                <div class="input" style="border:0px;">
                                        <input class="required" type="text" id="pict_url" name="item6"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="z">分类：</td>
                            <td>
                                <div class="input" style="border:0px;"> 
                                <select id="type" name="type">
                                    <option value='1' >美国FBA专线（普货）</option>
                                    <option value='2' >美国FBA专线（带电）</option>
                                    <option value='3' >欧洲FBA专线（普货）</option>
                                    <option value='4' >欧洲FBA专线（带电）</option>
                                </select>                            
                                </div>
                            </td>
                        </tr>
                          <tr>
                            <td class="z">类型：</td>
                            <td>
                                <div class="input" style="border:0px;"> 
                                 <select id="type" name="top">
                                    <option value='0' >数据</option>
                                    <option value='1' >头部</option>
                                </select>                            
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="z">&nbsp;</td>
                            <td>
                                <div class="botton" style="width:600px;">
                                    <input type="submit" value="添加">                                    
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
          </form>
    </div>
 </div>
<script>
$("#getinfo").click(function(){
    sVal=$("#itemurl").val();
    $.post("/purchase/getinfo",{url:sVal},function(data){
        if(data.success){//成功,设置             
          $("#title").val(data.name);
          $("#url").val(data.url);
          $("#price").val(data.price);
          $("#cost").val(data.price);
          $("#pict_url").val(data.image);
          $("#error").hide();
        }else{
            $("#error").show();
        }
   
     });
});
</script>